package com.wujing.high

/**
 * 伴生对象
 */
object AccompanyObject {
  def main(args: Array[String]): Unit = {

    println(ScalaPerson.sex)
  }
}
//伴生类
class ScalaPerson{
var name:String=_
}

//伴生对象
object ScalaPerson{
  var sex:Boolean=true
}